package a;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class Test {
	
	public static void main(String[] args) {
		
		String myName = "prajwal";
		int myAge = 24;
		try {
			
			Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root", "root");
			Statement st = con.createStatement();
			st.execute("INSERT INTO detail(name,age) VALUES ('"+myName+"','"+myAge+"')");
			
			con.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

}
